//格式化时间
export function formatDateTime(time) {
    const year = time.getFullYear(),
        month = time.getMonth() + 1,
        day = time.getDay(),
        hour = time.getHours() < 10 ? "0" + time.getHours() : time.getHours(),
        minute =
            time.getMinutes() < 10 ? "0" + time.getMinutes() : time.getMinutes(),
        second =
            time.getSeconds() < 10 ? "0" + time.getSeconds() : time.getSeconds();
    return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
}